package cn.edu.gdgm.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 服药计划
 * </p>
 *
 * @author generator
 * @since 2021-03-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_plan")
@ApiModel(value="Plan对象", description="服药计划")
public class Plan implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "服药计划ID（设置提醒ID）")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "服药时间（提醒时间）格式：时:分", required = true)
    @JsonFormat(pattern = "HH:mm", timezone="GMT+8")
    @DateTimeFormat(pattern="HH:mm")
    private Date planTime;

    @ApiModelProperty(value = "药仓ID", required = true)
    private String slotId;

    @ApiModelProperty(value = "设备ID（药盒ID）", required = true)
    private String deviceUuid;

    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "调用目标字符串（jobID）")
    private String invokeTarget;

    @ApiModelProperty(value = "任务状态（0正常 1暂停）")
    private String status;

    @ApiModelProperty(value = "计划创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createTime;


}
